import React, { Suspense } from 'react';
import ReactDOM from 'react-dom/client';
import './index.scss';
import router from '@/router';
import { RouterProvider } from 'react-router-dom';
import store from '@/store';
import { Provider } from'react-redux';
import Loading from '@/components/Loading';

const root = ReactDOM.createRoot(
  document.getElementById('root') as HTMLElement
);
root.render(
  // <React.StrictMode>
    <Provider store={store}>
      <Suspense fallback={<Loading />}>
        <RouterProvider router={router}></RouterProvider>
      </Suspense>
    </Provider>
  // </React.StrictMode>
);
